﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;

namespace Restaurant.API.Client
{
    /// <summary>
    /// 
    /// </summary>
    public class ClientAreaRegistration : AreaRegistration
    {

        /// <summary>
        /// 区域名称
        /// </summary>
        public override string AreaName
        {
            get
            {
                return "Client";
            }
        }

        /// <summary>
        /// 注册路由
        /// </summary>
        /// <param name="context"></param>
        public override void RegisterArea(AreaRegistrationContext context)
        {
            
            context.Routes.MapHttpRoute(
             name: "ClientAreaApi",
             routeTemplate: "api/Client/{controller}/{id}",
             defaults: new { id = RouteParameter.Optional, namespaces = new[] { "Restaurant.API.Client.Controllers" } }
         );


        }
    }
}